package com.yonder.controller;

import com.yonder.producer.Producer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName KafkaController
 * @Description TODO
 * @Author zxs
 * @Date 2021/5/9 16:53
 * Version 1.0
 */
@RestController
public class KafkaController {


    @Autowired
    private Producer producer;

    /**
     * @return
     * @throws Exception
     */
    @GetMapping("/send")
    public String sendM1() throws Exception {
        producer.send();
        return "ok";
    }
}
